// 2023-3-22 add yg  缴费信息查询api test
// 方法管用了, 但是没有可用的接口.
import request from "@/utils/request";



const  tableDataArr= [
      {
        id: 1,
        regNo: "xhl0894",
        shipNameNo: "1CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247748",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        toller: "杨国",
        paymentTime: "03-17 13:37",
      },
      {
        id: 2,
        regNo: 12,
        shipNameNo: "苏发达99999",
        paymentStatus: "已退费",
        ticketNo: "320321195001247749",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 3,
        regNo: 13,
        shipNameNo: "3CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 4,
        regNo: 14,
        shipNameNo: "4CN徐州兴隆888",
        paymentStatus: "未缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 5,
        regNo: 15,
        shipNameNo: "15CN徐州兴隆888",
        paymentStatus: "已退费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 6,
        regNo: 16,
        shipNameNo: "16CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 7,
        regNo: 17,
        shipNameNo: "17CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 8,
        regNo: 18,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 9,
        regNo: 19,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 10,
        regNo: 20,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 11,
        regNo: 2111,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 12,
        regNo: 2112,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 13,
        regNo: 2113,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 14,
        regNo: 2114,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 15,
        regNo: 2115,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 16,
        regNo: 2116,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 17,
        regNo: 2117,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 18,
        regNo: 2118,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 19,
        regNo: 2119,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 20,
        regNo: 211,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      },
      {
        id: 22,
        regNo: 212,
        shipNameNo: "18CN徐州兴隆888",
        paymentStatus: "已缴费",
        ticketNo: "320321195001247747",
        ticketValidNo: "007986",
        shipType: "货轮",
        price: "384",
        priceBase: "779.7",
        registerTime: "03-17 13:35",
        registerPerson: "杨国过过",
        paymentTime: "03-17 13:37",
        toller: "杨国",
      }
    ];


export function getPayDetail(data){
  return request(
    {
      url: '/yxdd/shipPay/pay/info/detail',
      method: 'post',
      data
    }
  )
}

export function getPaymentInfoListByPage( data ){
  return request(
    {
      url: '/yxdd/shipPay/pay/info/findPage',
      method: 'post',
      data
    }
  )

  //only test
  // return new Promise((resolve, reject)=>{
  //   setTimeout(()=>{
  //     let retArr =[]
  //     //current form 1,
  //     //
  //     let {current, pageSize} = data;
  //       // page 1 , pagesize 10
  //       //tableDataArr
  //     retArr= tableDataArr.slice(0 + pageSize* (current-1) ,pageSize * current)
  //
  //     let r = {
  //       total: tableDataArr.length,
  //       current,
  //       pageSize,
  //       data: retArr
  //     }
  //     resolve(r);
  //
  //   },1000)
  //
  // } )
}
